 <!-- 我的预测 - 详情内容 -->
<template>
  <div class="index">
   
    <div class="forecast-cell" style="background-color: #f9f9f9;">

      <div class="fore-name">{{forecast.title}}</div>
      <label class="fore-time">{{dateFormat(forecast.create_time)}}</label>

      <div style="display:block;height:32px;">
        <label class="media_name color-blue">{{forecast.media_name}}</label>
        <div class="media-detail" style="display:inline;">
         <span class="service-num" style="font-size:26rpx;"> 阅览人数 
          <span id="service_num" class="color-orange" style="font-size:12px;">
            {{forecast.service_num}}
          </span></span>
        </div>
      </div>
    </div>

    <!-- 付费前 -->
    <div class="forecast-cell">
      <div class="fore_name">付费前可看</div>
      <div class="fore-content" style="color:#444;">
        <div id="paid-before" class="content-cell">
          {{forecast.content_before_pay}}
        </div>
      </div>
    </div>
    <!-- 付费后 -->
    <div class="forecast-cell" style="background-color: #f9f9f9;">
      <div class="fore_name">付费后可看</div>
      <div class="fore-content" style="color:#555;">
        <div class="content-cell" id="paid-after">
          {{forecast.content_paid}}
        </div>
      </div>
    </div>

    <div class="fore-bottom">
      <span class="color-orange" id="recognized_num">{{forecast.recognized_num}}</span> 
    人已获取
    </div>
  </div>

</template>

<script>
export default {
  data () {
    return {
      forecast: this.$parent.forecastList[+this.$route.query.index]
    }
  },
  methods: {
    dateFormat (t) {
      return this.$parent.$parent.util.dateFormat(t)
    }
  },
  created () {
    this.$store.commit('ISAUTHORHOME', false)
  },
  mounted () {
    // setTimeout(this.createUserForecastLog(), 300)
  },
   // 销毁时恢复父本的状态
  destroyed () {
    this.$store.commit('ISAUTHORHOME', true)
  }
}
</script>
<style src="../style/forecast.less"></style>
